<?php $status = "" ?>
<div id="register" class="container">
    <h2><span><?php echo $title ?></span></h2>
    <?php if(isset($message)){ ?>
        <?php  if($message != "0"): ?>
            <div class="alert alert-success"><i class="fa fa-check-circle"></i> Your Account Has Been Registered</div>
        <?php else: ?>
            <div class="alert alert-danger"><i class="fa fa-frown-o fa-3x"></i><br/><?php echo $error ?></div>
        <?php endif; ?>
    <?php }else if(isset($_COOKIE['c_iduser'])){ $status = "disabled" ?>
            <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i>&nbsp; You still loged in as <b><?php echo $_COOKIE['c_fullname'] ?></b>. New user can't be registered while another user still loged in. <a href="<?php echo site_url('Login/logout')?>">Click here</a> to Logout.</div>
    <?php }else{ ?>
        <div class="alert alert-warning"><i class="fa fa-exclamation-circle"></i>&nbsp; Form With <span style="color:red;">*</span> sign is required</div>
    <?php } ?>
        <form action="<?php if(!isset($_COOKIE['c_iduser'])): echo site_url('Home/register'); else: echo site_url(); endif; ?>" enctype="multipart/form-data" method="post">
        <table class="table">
            <tr>
                <th width="15%">Username <span style="color:red;">*</span></th>
                <td width="25%">
                    <input type="text" name="reg_username" class="form-control input-sm" <?php echo $status ?>/>
                    <small>Ex: abdulkholid (lowercase is recommended)</small>
                </td>
                <th width="15%">Full Name <span style="color:red;">*</span></th>
                <td width="25%">
                    <input type="text" name="reg_fullname" class="form-control input-sm" <?php echo $status ?>/>
                </td>
            </tr>
            <tr>
                <th>Password <span style="color:red;">*</span></th>
                <td>
                    <input type="password" name="reg_password" class="form-control input-sm" <?php echo $status ?>/>
                    <small>Minimum 6 Charcters</small>
                </td>
                <th>Re-type Password <span style="color:red;">*</span></th>
                <td>
                    <input type="password" name="reg_2ndpassword" class="form-control input-sm" <?php echo $status ?>/>
                </td>
            </tr>
            <tr>
                <th>Facebook Username</th>
                <td>
                    <input type="text" name="reg_fb" class="form-control input-sm" <?php echo $status ?>/>
                    <small>Ex: kholid.myusername</small>
                </td>
                <th>Twitter Username</th>
                <td>
                    <input type="text" name="reg_twitter" class="form-control input-sm" <?php echo $status ?>/>
                    <small>Ex: AbdulKholid_</small>
                </td>
            </tr>
            <tr>
                <th>Google+ Username</th>
                <td>
                    <input type="text" name="reg_gplus" class="form-control input-sm" <?php echo $status ?>/>
                    <small>Ex: Olide00</small>
                </td>
                <th>&nbsp;</th>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td colspan="4" align="center">
                    <input <?php echo $status ?> type="checkbox" name="agree" value="agree"/> I agree about <a href="#">ToS</a> (Term of Use) of Travelina <span style="color:red;">*</span><br/><br/>
                    <button <?php echo $status ?> class="btn btn-lg btn-blue" type="submit" name="btn_reg" value="register" style="border-radius: 50%;padding: 20px 21px;">
                        <i class="fa fa-send fa-fw"></i>
                    </button>
                </td>
            </tr>
        </table>
    </form>
</div>
